package artid.com.arttogo.network;

public class AppUrl {
    // public static final String API_USER =
    // "http://223.202.31.26:7000/ddinsuranceservice/user";
    //
    // public static final String API_BASE =
    // "http://223.202.31.26:7000/ddinsuranceservice/base";

    public static final String ART_HALL = "arthall";// 艺术展厅
    public static final String AUTH_NEWS = "auth_news";// 艺术资讯
    public static final String AUCTION_DYNAMEICS = "auction_dynamics";// 拍卖详情
    public static final String EXHIBITION = "exhibition";// 展会详情
    public static final String GALLERISE = "galleries";// 艺术画廊
    public static final String LOAD_HOMEPAGE_WEB = "homepage";// 加载网页
    public static final String LOAD_WEB_WITH_TITLE = "pagetitle";// 加载网页
    public static final String PLAYBEEP = "playBeep";// 提示音
    public static final String VIBRATE = "vibrate";// 震动
    public static final String SYSTEMMESSAGE = "systemMessage";//系统消息
    public static final String ART_HALL_QJ = "ART_HALL_QJ";//系统消息
    public static final String JIANZHENG_WEB = "http://www.aicpsp.org/artidPortal/main";//系统消息
    public static final String SHOW_DOT_TAG = "SHOW_DOT_TAG";//photoactivity显示带点的微观图
//	private static HttpUriRequest getHttpPost(String uri, String type,
//											  List<NameValuePair> params) {
//		Config.i("url:" + uri);
//		// Config.i("url:" + uri + "/" + type);
//		// HttpPost request = new HttpPost(uri);
//		// try {
//		// if (params != null && !params.isEmpty()) {
//		// JSONObject obj = new JSONObject();
//		// for (NameValuePair nvp : params) {
//		// obj.put(nvp.getName(), nvp.getValue());
//		// }
//		// String content = obj.toString();
//		// Config.i("content:" + content);
//		// StringEntity entity = new StringEntity(content, "utf-8");
//		// request.setEntity(entity);
//		// }
//		// request.addHeader("Content-Type", "application/json");
//		// // request.addHeader("content-encoding", "utf-8");
//		//
//		// // request.addHeader("Accept-Language", "zh-cn");
//		// // request.addHeader("Accept-Encoding", "gzip");
//		// request.addHeader("Accept",
//		// "application/json, text/javascript, */*");
//		// request.addHeader("Request-Type", "post");
//		// } catch (UnsupportedEncodingException e) {
//		// e.printStackTrace();
//		// } catch (JSONException e) {
//		// e.printStackTrace();
//		// }
//		String p = "/";
//		if (params != null && !params.isEmpty()) {
//			// JSONObject obj = new JSONObject();
//			for (NameValuePair nvp : params) {
//				p = p + nvp.getName() + "/" + nvp.getValue() + "/";
//			}
//		}
//		// String content = obj.toString();
//		// Config.i("content:" + content);
//		// StringEntity entity = new StringEntity(content, "utf-8");
//		// request.setEntity(entity);
//		// }
//		String url = uri + p;
//		System.out.println("url:" + (uri + p));
//		HttpGet request = new HttpGet(url.substring(0, url.length() - 1));
//		request.addHeader("Content-Type", "application/json");
//		request.addHeader("Accept", "application/json, text/javascript, */*");
//		return request;
//	}
//
//    /**
//     * 用户注册接口
//     * <p>
//     * http://124.205.21.162:89/m.php/login/Registered/mobile/15712957261/
//     * password/abc765/realname/huwei222
//     * <p>
//     * http://124.205.21.162:89/m.php/login/Registered/mobile/18710085136/
//     * password/abc765/realname/huwei222
//     *
//     * @param mobile   电话号（账号）
//     * @param password 密码
//     * @param realname 用户昵称
//     * @return
//     */
//    public static HttpUriRequest Registered(String mobile, String password,
//                                            String realname) {
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("mobile", mobile));
//        params.add(new BasicNameValuePair("password", password));
//        params.add(new BasicNameValuePair("realname", realname));
//        return getHttpPost(Cache.baseUrl + "login/Registered", "newsList",
//                params);
//    }
//
////	public static void Registered1(Context mContext, String mobile,
////			String password, String realname) {
////		RequestParams rp = new RequestParams();
////		// rp.put("mobile", mobile);
////		// rp.put("password", password);
////		// rp.put("realname", realname);
////		httpGet(mContext,
////				Cache.baseUrl
////						+ "login/Registered/mobile/15712957261/password/abc765/realname/huwei222",
////				rp, "");
////
////	}
//
//    /**
//     * 用户登录接口
//     * <p>
//     * http://124.205.21.162:89/m.php/login/login/loginname/15712957261/password/123456
//     *
//     * @param loginname 电话号（账号）
//     * @param password  密码
//     * @return
//     */
//    public static HttpUriRequest loginname(String loginname, String password) {
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("loginname", loginname));
//        params.add(new BasicNameValuePair("password", password));
//        return getHttpPost(Cache.baseUrl + "login/login/loginname", "newsList",
//                params);
//    }
//
//    /**
//     * 修改密码
//     * <p>
//     * http://124.205.21.162:89/m.php/member/modifypwd/rawpwd/abc765/newpwd/123456/token/2d9a1139c96d6e85c292e5b979a15e74
//     *
//     * @param rawpwd 旧密码
//     * @param newpwd 新密码
//     * @return
//     */
//    public static HttpUriRequest modifypwd(String rawpwd, String newpwd) {
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("rawpwd", rawpwd));
//        params.add(new BasicNameValuePair("newpwd", newpwd));
//        return getHttpPost(Cache.baseUrl + "member/modifypwd", "newsList",
//                params);
//    }
//
//    /**
//     * 重置密码
//     * <p>
//     * http://124.205.21.162:89/m.php/login/resetPwd_data/mobile/18710085136/
//     * code/111/password/abc765/repassword/abc765
//     *
//     * @param mobile   账号
//     * @param code     验证码
//     * @param password 新密码
//     * @return
//     */
//    public static HttpUriRequest resetPwdData(String mobile, String code,
//                                              String password) {
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("mobile", mobile));
//        params.add(new BasicNameValuePair("code", code));
//        params.add(new BasicNameValuePair("password", password));
//        return getHttpPost(Cache.baseUrl + "login/resetPwd_data", "newsList",
//                params);
//    }
//
//    /**
//     * 退出账号
//     * <p>
//     * http://124.205.21.162:89/m.php/login/logout/token/abc765
//     *
//     * @param token
//     * @return
//     */
//    public static HttpUriRequest logout(String token) {
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("token", token));
//        return getHttpPost(Cache.baseUrl + "login/logout", "newsList", params);
//    }
//
//    /**
//     * 手机发送验证码
//     * <p>
//     * http://124.205.21.162:89/m.php/login/sendregcode/mobile/18710085136
//     *
//     * @param mobile
//     * @return
//     */
//    public static HttpUriRequest sendregcode(String mobile) {
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("mobile", mobile));
//        return getHttpPost(Cache.baseUrl + "login/sendregcode", "newsList",
//                params);
//    }
//
//    /**
//     * 手机验证验证码
//     * <p>
//     * http://124.205.21.162:89/m.php/login/code/mobile/18710085136/code/123456
//     *
//     * @param mobile
//     * @return
//     */
//    public static HttpUriRequest code(String mobile, String code) {
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("mobile", mobile));
//        params.add(new BasicNameValuePair("code", code));
//        return getHttpPost(Cache.baseUrl + "login/code", "newsList", params);
//    }
//
//    /**
//     * 艺术资讯列表
//     *
//     * @param accountName
//     * @param password
//     * @return
//     * @author hushuan
//     */
//    public static HttpUriRequest newsList() {
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("page", "1"));
//        params.add(new BasicNameValuePair("type", "1"));
//        return getHttpPost(Cache.baseUrl + "Index/newsList", "newsList", params);
//    }
//
//    /**
//     * 拍卖列表
//     *
//     * @param accountName
//     * @param password
//     * @return
//     * @author hushuan
//     */
//    public static HttpUriRequest auctionList(String stat) {
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("stat", stat));
//        return getHttpPost(Cache.baseUrl + "Paimai/auctionList", "auctionList",
//                params);
//    }
//
//    public static HttpUriRequest portableProductionDetail(String code) {
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("qrVal", code));
//        return getHttpPost(Cache.portableProductionDetail, "", params);
//    }
//
//    /**
//     * 展会列表 http://124.205.21.162:89/m.php/zhanhui/exhibitionList/page/1/stat/0
//     *
//     * @param accountName
//     * @param password
//     * @return
//     * @author hushuan
//     */
//    public static HttpUriRequest exhibitionList() {
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("page", "1"));
//        params.add(new BasicNameValuePair("stat", "0"));
//        return getHttpPost("http://124.193.95.86:28081/" + "zhanhui/exhibitionList",
//                "newsList", params);
//    }
//
//    /**
//     * 画廊列表 http://124.205.21.162:89/m.php/hall/galleryList/page/1
//     *
//     * @param accountName
//     * @param password
//     * @return
//     * @author hushuan
//     */
//    public static HttpUriRequest galleryList() {
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("page", "1"));
//        return getHttpPost(Cache.baseUrl + "hall/galleryList", "newsList",
//                params);
//    }
//
//    /**
//     * j
//     *
//     * @param Url
//     * @param stringEntity
//     * @param INRER_TYPE
//     */
////	private static void httpPost(Context mContext, String Url,
////			StringEntity stringEntity, String type) {
////
////		NearHttpClient.post(mContext, Url, stringEntity, type,
////				new NearHttpResponseHandler() {
////					@Override
////					public void onSuccess(JSONObject arg0) {
////						// TODO Auto-generated method stub
////						super.onSuccess(arg0);
////						System.out.println("onSuccess=" + arg0.toString());
////					}
////
////					@Override
////					public void onFailure(Throwable arg0, String arg1) {
////						// TODO Auto-generated method stub
////						super.onFailure(arg0, arg1);
////						System.out.println("网络请求失败 =" + arg1);
////					}
////
////					@Override
////					public void onFinish() {
////						// TODO Auto-generated method stub
////						super.onFinish();
////						// intent("");
////						Log.e("onFinish", "onFinish");
////
////					}
////
////					public void onStart() {
////						// TODO Auto-generated method stub
////						super.onStart();
////						Log.e("onStart", "onStart");
////
////					}
////
////				});
////	}
//
//    /**
//     * j
//     *
//     * @param Url
//     * @param stringEntity
//     * @param INRER_TYPE
//     */
////	private static void httpGet(Context mContext, String Url,
////			RequestParams stringEntity, String type) {
////
////		NearHttpClient.get(mContext, Url, stringEntity,
////				new NearHttpResponseHandler() {
////
////					@Override
////					public void onSuccess(JSONObject arg0) {
////						// TODO Auto-generated method stub
////						super.onSuccess(arg0);
////						System.out.println("onSuccess=" + arg0.toString());
////					}
////
////					@Override
////					public void onFailure(Throwable arg0, String arg1) {
////						// TODO Auto-generated method stub
////						super.onFailure(arg0, arg1);
////						System.out.println("网络请求失败 =" + arg1);
////					}
////
////					@Override
////					public void onFinish() {
////						// TODO Auto-generated method stub
////						super.onFinish();
////						// intent("");
////						Log.e("onFinish", "onFinish");
////
////					}
////
////					public void onStart() {
////						// TODO Auto-generated method stub
////						super.onStart();
////						Log.e("onStart", "onStart");
////
////					}
////
////				});
////	}
//
//    public static final String BASE = "http://d.ma349.com/learningtreasureWAP/";
//
//    /**
//     * userLogin:4.2 用户登录. <br/>
//     *
//     * @param accountName
//     * @param password
//     * @return
//     * @author
//     */
//    public static HttpUriRequest userLogin(Context context, String umToken) {
//
//        List<NameValuePair> params = new ArrayList<NameValuePair>();
//        params.add(new BasicNameValuePair("accountName", "123123"));
//        params.add(new BasicNameValuePair("password", "123123"));
//        params.add(new BasicNameValuePair("phoneType", "1"));
//        params.add(new BasicNameValuePair("version", "123123"));
//        params.add(new BasicNameValuePair("longitude", "123123"));
//        params.add(new BasicNameValuePair("latitude", "123123"));
//        params.add(new BasicNameValuePair("appToken", "123123"));
//        params.add(new BasicNameValuePair("deviceUuid", "123123"));
//
//        return getHttpPost(BASE, "login", params);
//    }
}
